package com.exportservices;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebService;

import org.springframework.stereotype.Service;

import com.exportservices.DAO.MainDataBaseDAO;
import com.exportservices.domain.Client;
import com.exportservices.domain.Color;
import com.exportservices.domain.Curs;
import com.exportservices.domain.Discount;
import com.exportservices.domain.Document;
import com.exportservices.domain.FinDoc;
import com.exportservices.domain.GroupID;
import com.exportservices.domain.GroupSection;
import com.exportservices.domain.Kart;
import com.exportservices.domain.Manager;
import com.exportservices.domain.Price;
import com.exportservices.domain.Rules;
import com.exportservices.domain.Sklad;
import com.exportservices.domain.Tovar;
import com.exportservices.domain.TypeDoc;
import com.exportservices.domain.TypePrice;
import com.exportservices.domain.Val;

@Service("ServicesEndpoint")
@WebService(endpointInterface="com.exportservices.MainExport", serviceName="services")
public class MainExportImpl implements MainExport {

	protected MainDataBaseDAO mainDAO;
	
	public MainExportImpl(){
		mainDAO=new MainDataBaseDAO();
	}
	
	@WebMethod
	public List<Client> getClientList() {
		
		return (List<Client>)(mainDAO.getListClientWithChange());
	}

	@WebMethod
	public List<Color> getColorList() {
		return (List<Color>) mainDAO.getListColorWithChange();
	}

	@WebMethod
	public List<Curs> getCursList() {
		return (List<Curs>) mainDAO.getListCursWithChange();
	}

	@WebMethod
	public List<Document> getDocumentList() {
		// TODO Auto-generated method stub
		return null;
		
	}

	@WebMethod
	public List<FinDoc> getFinDocList() {
		return (List<FinDoc>) mainDAO.getListFinDocWithChange();
	}

	@WebMethod
	public List<GroupID> getGroupIDList() {
		return (List<GroupID>) mainDAO.getListGroupIDWithChange();
	}

	@WebMethod
	public List<GroupSection> getGroupSectionList() {
		return (List<GroupSection>) mainDAO.getListGroupSectionWithChange();
	}

	@WebMethod
	public List<Kart> getKartList() {
		return (List<Kart>) mainDAO.getListKartWithChange();
	}

	@WebMethod
	public List<Manager> getManagerList() {
		return (List<Manager>) mainDAO.getListManagerWithChange();
	}

	@WebMethod
	public List<Price> getPriceList() {
		return (List<Price>) mainDAO.getListPriceWithChange();
	}

	@WebMethod
	public List<Sklad> getSkladList() {
		return (List<Sklad>) mainDAO.getListSkladWithChange();
	}

	@WebMethod
	public List<Tovar> getTovarList() {
		return (List<Tovar>) mainDAO.getListTovarWithChange();
	}

	@WebMethod
	public List<TypeDoc> getTypeDocList() {
		return (List<TypeDoc>) mainDAO.getListTypeDocWithChange();
	}

	@WebMethod
	public List<TypePrice> getTypePriceList() {
		return (List<TypePrice>) mainDAO.getListTypePriceWithChange();
	}

	@WebMethod
	public List<Val> getValList() {
		return (List<Val>) mainDAO.getListValWithChange();
	}

	@WebMethod
	public List<Rules> getRulesList() {
		return (List<Rules>) mainDAO.getListRulesWithChange();
	}

	@WebMethod
	public List<Discount> getDiscountList() {
		return (List<Discount>) mainDAO.getListDiscountWithChange();
	}

	@WebMethod
	public boolean commitChange() {
		// TODO Auto-generated method stub
		return false;
	}

}
